Don't leave behind corrupt directories
authorAlex Crichton <alex@alexcrichton.com>
Mon, 27 Oct 2014 19:44:50 +0000 (12:44 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 27 Oct 2014 19:44:50 +0000 (12:44 -0700)
Ensure that a system `rm -rf target` will continue to work across test runs.

tests/test_cargo_compile.rs

index afb48727d07bfba4a1ae066e1867370e6483dcc6..58da5ca0eadcf29da8413971f974724e83c9f821 100644 (file)
@@ -1683,4 +1683,5 @@ test!(ignore_bad_directories {
     fs::mkdir(&foo.root().join("tmp"), io::USER_EXEC ^ io::USER_EXEC).unwrap();
     assert_that(foo.process(cargo_dir().join("cargo")).arg("build"),
                 execs().with_status(0));
+    fs::chmod(&foo.root().join("tmp"), io::USER_DIR).unwrap();
 })